package cn.wolfcode.ssm.mapper;

import cn.wolfcode.ssm.domain.Notice;
import cn.wolfcode.ssm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Notice record);

    Notice selectByPrimaryKey(Long id);

    List<Notice> selectAll();

    int updateByPrimaryKey(Notice record);

    List<Notice> selectForList(QueryObject qo);

    // 用户查看通知消息的同时往中间表插入数据
    void SaveNoticeANDEmployee(@Param("nId") Long nId, @Param("eId") Long eId);

    // 删除通知时同时也删除中间表的数据
    void DeleteNoticeANDEmploye(Long id);

    List<Long> selectEid(Long nId);

    void updateStatus(@Param("status") Boolean status, @Param("id") Long id);

    List<Long> selectNid(Long eId);
}